package com.husd.framework.math;

/**
 * @author hushengdong
 */
public class Strassen {

    //普通版本的矩阵乘法
    public static int[][] matrix(int[][] a, int[][] b) {

        // a = N * N
        // b = N * N
        int n = a.length;
        int[][] c = new int[n][n];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                int c_ij = 0;
                for (int k = 0; k < n; k++) {
                    c_ij += a[i][k] * b[k][j];
                }
                c[i][j] = c_ij;
            }
        }
        return c;
    }
}
